﻿<ResourceDictionary
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:local="clr-namespace:Dotway.WPF.Controls">
    <Style TargetType="{x:Type local:ColorMap}">
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="{x:Type local:ColorMap}">
                    <Grid>
                        <Border x:Name="PART_ImageBorder" Background="{TemplateBinding Background}"
                            BorderBrush="{TemplateBinding BorderBrush}"
                            BorderThickness="{TemplateBinding BorderThickness}" />
                        <Ellipse Fill="Transparent" Stroke="#FFFFFFFF" HorizontalAlignment="Left" VerticalAlignment="Top" Margin="-5,-5,0,0" Width="10" Height="10" RenderTransformOrigin="0.5,0.5">
                            <Ellipse.RenderTransform>
                                <TranslateTransform X="{Binding Path=Position.X, RelativeSource={RelativeSource TemplatedParent}}" Y="{Binding Path=Position.Y, RelativeSource={RelativeSource TemplatedParent}}" />
                            </Ellipse.RenderTransform>
                        </Ellipse>
                        <Ellipse Fill="Transparent" Stroke="#FF000000" HorizontalAlignment="Left" VerticalAlignment="Top" Margin="-4,-4,0,0" Width="8" Height="8" RenderTransformOrigin="0.5,0.5">
                            <Ellipse.RenderTransform>
                                <TranslateTransform X="{Binding Path=Position.X, RelativeSource={RelativeSource TemplatedParent}}" Y="{Binding Path=Position.Y, RelativeSource={RelativeSource TemplatedParent}}" />
                            </Ellipse.RenderTransform>
                        </Ellipse>
                    </Grid>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>
</ResourceDictionary>